package com.ruoyi.classai.api;

import com.ruoyi.classai.domain.AnalysisModeRel;
import com.ruoyi.classai.service.IEwcDeepSeekAccessService;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import java.io.IOException;

/**
 * 用户登录接口
 * @author zl
 * @date 2025年02月27日 11:56
 */
@Slf4j
@Validated
@RestController
@Tag(name = "deepseek接入", description = "deepseek接入")
@RequestMapping("/api/deepSeek")
public class DeepSeekAccessApi extends BaseController {

    @Autowired
    private IEwcDeepSeekAccessService iEwcDeepSeekAccessService;

    @PostMapping("/deepSeekAccessRec")
    public AjaxResult deepSeekAccessRec(@Valid @RequestBody AnalysisModeRel analysisModeRel) throws IOException {
        String result =iEwcDeepSeekAccessService.deepSeekAccessRec(analysisModeRel);
        return AjaxResult.success(result);
    }

    }